// VisionGraphControl.cpp : implementation file
//

#include "stdafx.h"
#include "VisionGraph.h"
#include "VisionGraphControl.h"
#include "ChildFrm.h"

extern	CMap<CString, LPCTSTR, CVisionWrapper*, CVisionWrapper*>  m_Vision;
extern	CMap<CString, LPCTSTR, ConfigWrapper*, ConfigWrapper*>  m_Config;
extern ConfigWrapper* pconfig ;

// CVisionGraphControl

IMPLEMENT_DYNAMIC(CVisionGraphControl, CXTPFlowGraphControl)

CVisionGraphControl::CVisionGraphControl()
{

}

CVisionGraphControl::~CVisionGraphControl()
{
}


BEGIN_MESSAGE_MAP(CVisionGraphControl, CXTPFlowGraphControl)
	ON_WM_LBUTTONDOWN()
END_MESSAGE_MAP()



// CVisionGraphControl message handlers




void CVisionGraphControl::OnLButtonDown(UINT nFlags, CPoint point1)
{
	// TODO: Add your message handler code here and/or call default
	//pconfig = NULL;
	//CPoint point;
	//GetCursorPos(&point);
	//ScreenToClient(&point);
	//CXTPFlowGraphNode* pNode = HitTestNode(point);
	//CXTPFlowGraphConnection* pConnection = HitTestConnection(point);
	//CXTPFlowGraphSelectedElements* pSelection = GetActivePage()->GetSelection();
	//if (pNode)
	//{
	//	if (!pNode->IsSelected())
	//	{
	//		pSelection->Clear();
	//		pNode->Select();
	//	}
	//	CString strcaption = pNode->GetCaption();
	//	GetActivePage()->GetNodes()->MoveToFront(pNode);
	//	CString caption;
	//	if(m_Config.Lookup(strcaption,pconfig))
	//	{
	//		CChildFrame * child = (CChildFrame*)this->GetParent()->GetParent();
	//		child->UpdatePropertyGridContent(pconfig);
	//	}
	//}
	CXTPFlowGraphControl::OnLButtonDown(nFlags, point1);
}
